/**
 * @Author: wy
 * @Date: 2020/06/05
 * @Last Modified by: 
 * @Last Modified time: 
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 分配规则分页查询
export const getClueDistributeConfig = params => axios.get(`${SERVER.CLUECENTER}/clueDistributeConfig`,  {params});

// 分配规则u分页查询
export const getListByDept = params => axios.get(`${SERVER.CLUECENTER}/clueDistributeConfig/getListByDept`,  {params});

// 保存
export const saveConfig = params => axios.put(`${SERVER.CLUECENTER}/clueDistributeConfig/save/saveConfig`,  params );

// 新增
export const insertConfig = params => axios.post(`${SERVER.CLUECENTER}/clueDistributeConfig`,  params );


// 导出
export const exportConfig = params => {
    return axios({
      url: `${SERVER.CLUECENTER}/clueDistributeConfig/exportConfigByExcel`,
      method: 'get',
      params: params,
      responseType: 'blob',
      //60分钟
      timeout: (10 * 1000) * 60
    });
  };

// 导入
export const importPackages = params => axios.post(`${SERVER.CLUECENTER}/clueDistributeConfig/importPackages`, params);